<template>
	<view class="wrap bgw">
		<!-- ok -->
		<view v-if="data.code == 0" class="main bt1">
			<image class="img1" src="../../static/image/success.png"></image>
			<p class="p1 cc1 text-lg">会员收款成功</p>
			<p class="p2 text-xxl">{{ data.money }} 剧豆</p>
			<view  v-if="data.remarks != '' " class="txt cc2">
				<view class="fl">备注</view>
				<view class="fr one">{{ data.remarks }}</view>
			</view>
		</view>
		<!-- file -->
		<view v-if="data.code != 0" class="main bt1">
			<image v-if="data.code != 0" class="img1 files" style="width: 100rpx; height: 100rpx;" src="../../static/image/icon_fail.png"></image>
			<p class="p1 cc1 text-lg">失败原因： {{ data.msg }}</p>
		</view>

		<view v-if="data.code == 0" class="btn p30"><button @tap="ok()" class="btnbg">完成</button></view>

		<view v-if="data.code != 0" class="btn fileBtn p30"><button @tap="ok()" class="btnbg">重新收款</button></view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			shakeState:0,
			data: []
		};
	},
	created() {
		let data = uni.getStorageSync('payData');
		if (data.code == 0) {
			data.txt = '会员收款成功';
		} else {
			data.txt = '会员收款失败';
		}
		this.data = data;
		uni.setNavigationBarTitle({
			title: data.txt
		});
	},
	methods: {
		ok() {
			if(this.shakeState == 0){
				this.shakeState = 1
				uni.navigateBack();		
			} 
		}
	}
};
</script>

<style lang="less" scoped>
@import 'index.less';
</style>
